package com.liangzhong.modules.mail.command
{
	import com.liangzhong.constants.ApplicationConstants;
	import com.liangzhong.modules.mail.mediator.MailMediator;
	import com.liangzhong.proxy.mail.MailProxy;
	
	import org.puremvc.as3.interfaces.INotification;
	import org.puremvc.as3.patterns.command.SimpleCommand;

	/**
	 * 邮件 
	 * @author lake
	 * 
	 */	
	public class MailCommand extends SimpleCommand
	{
		public function MailCommand()
		{
			super();
		}
		override public function execute(notification :INotification):void
		{
			var proxy:MailProxy = facade.retrieveProxy(MailProxy.ProxyName) as MailProxy;
			switch(notification.getName())
			{
				case ApplicationConstants.MAIL_GET_LIST://获取邮件列表
				{
					proxy.getMailList(notification.getBody());
					break;
				}
				case ApplicationConstants.MAIL_GET_GOODS://获取物品
				{
					proxy.getGoods(int(notification.getBody()));
					break;
				}
			}
		}
	}
}